package com.example.mobile2030606148tdh0415;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

public class MainActivity extends AppCompatActivity {

    private TextView tvMainTitle;
    private RecyclerView rvMainPeople;
    private String[] names=new String[]{"广东职业技术学院","佛山职业技术学院","深圳职业技术学院","番禺职业技术学院","东莞职业技术学院","珠海职业技术学院","河源职业技术学院","惠州职业技术学院","梅州职业技术学院","清远职业技术学院"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        rvMainPeople.setLayoutManager(new LinearLayoutManager(this));
    PeopleAdapter adapter=new PeopleAdapter(names);
    rvMainPeople.setAdapter(adapter);
    }


    private void initView() {
        tvMainTitle = (TextView) findViewById(R.id.tvMainTitle);
        rvMainPeople = (RecyclerView) findViewById(R.id.rvMainPeople);
    }
}